Thermal throttling control for testing of real-time software

ABSTRACT

A computer implemented method, data processing system, and processor are provided for thermal throttling control for testing of real-time software. At least one thermal control setting is received. A thermal management system is set to a test mode using the at least one thermal control settings, where the test mode indicates a thermal throttling control using the thermal control setting. The real-time software is executed under the test mode and a test is performed as to whether a real-time deadline associated with the real-time software is met under the test mode. At least one thermal control setting is recorded as a passing thermal control setting in response to the real-time software meeting the real-time deadline.

This application is a continuation-in-part application of U.S.application Ser. No. 11/289,088 filed Nov. 29, 2005.

BACKGROUND

1. Field of the Invention

The present application relates generally to use of thermal management.Still more particularly, the present application relates to a computerimplemented method, data processing system, and processor for thermalthrottling control for testing of real-time software.

2. Description of the Related Art

The first-generation heterogeneous Cell Broadband Engine™ (BE) processoris a multi-core chip comprised of a 64-bit Power PC® processor core andeight single instruction multiple data (SIMD) synergistic processorcores, capable of massive floating point processing, optimized forcompute-intensive workloads and broadband rich media applications. Ahigh-speed memory controller and high-bandwidth bus interface are alsointegrated on-chip. Cell BE's breakthrough multi-core architecture andultra high-speed communications capabilities deliver vastly improved,real-time response, in many cases ten times the performance of thelatest PC processors. Cell BE is operating system neutral and supportsmultiple operating systems simultaneously. Applications for this type ofprocessor range from a next generation of game systems with dramaticallyenhanced realism, to systems that form the hub for digital media andstreaming content in the home, to systems used to develop and distributedigital content, and to systems to accelerate visualization andsupercomputing applications.

Today's multi-core processors are frequently limited by thermalconsiderations. Typical solutions include cooling and power management.Cooling may be expensive and/or difficult to package. Power managementis generally a coarse action, “throttling” much if not all of theprocessor in reaction to a thermal limit being reached. Other techniquessuch as thermal management help address these coarse actions by onlythrottling the units exceeding a given temperature. However, mostthermal management techniques impact the real-time guarantees of anapplication. Therefore, it would be beneficial to provide a thermalmanagement solution which provides a processor with a method toguarantee the real-time nature of an application even in the event of athermal condition which requires throttling of the processor. In thecases where the real-time guarantees can not be met, the applicationadministrator is notified so that a corrective action can beimplemented.

SUMMARY

The different aspects of the illustrative embodiments provide a computerimplemented method, data processing system, and processor for thermalthrottling control for testing of real-time software. The illustrativeembodiments receive at least one thermal control setting. Theillustrative embodiments set a thermal management system to a test modeusing the at least one thermal control settings, wherein the test modeindicates a thermal throttling control using the thermal controlsetting. The illustrative embodiments execute the real-time softwareunder the test mode and test if a real-time deadline associated with thereal-time software is met under the test mode. Responsive to thereal-time software meeting the real-time deadline, the illustrativeembodiments record the at least one thermal control setting as a passingthermal control setting.

The illustrative embodiments determine if at least one more thermalcontrol setting that has an increased throttling under which thereal-time software may be tested exists. Responsive to the existence ofthe increased thermal control setting, the illustrative embodimentsexecute and test the real-time software a second time using theincreased throttling setting.

Responsive to the software program failing to meet the real-timedeadline, the illustrative embodiments record the at least one thermalcontrol setting as a failing thermal control setting.

The illustrative embodiments determine if at least one more thermalcontrol setting that has a decreased throttling setting under which thereal-time software may be tested exists. Responsive to the existence ofthe decreased thermal control setting, the illustrative embodimentsexecute and test the real-time software a second time using thedecreased throttling setting.

The test mode in the illustrative embodiments may specify an alwaysthrottle state of the thermal management system or a random throttlestate of the thermal management system. The random throttle stateinjects random thermal events to simulate more realistic interactions ofthrottling and the execution of software.

The thermal control settings may include an amount of throttling to beinitiated and a duration for the test mode to be initiated. The amountof throttling initiated may be a percentage of time that a unit isstopped versus time that the unit is run. The time that a unit isstopped and the time that the unit is run may be scaled by a scaleregister value. The duration for the throttling mode to be initiated maybe an actual number of clock cycles that a unit stops and runs.

The passing and failing thermal control setting may be stored in a datastructure. The test mode may be set in a thermal management controlregister. The integrated circuit may be a heterogeneous multi-coreprocessor.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the illustrativeembodiments are set forth in the appended claims. The illustrativeembodiments themselves, however, as well as a preferred mode of use,further objectives and advantages thereof, will best be understood byreference to the following detailed description of the illustrativeembodiments when read in conjunction with the accompanying drawings,wherein:

FIG. 1 depicts a pictorial representation of a network of dataprocessing systems in which aspects of the illustrative embodiments maybe implemented;

FIG. 2 depicts a block diagram of a data processing system is shown inwhich aspects of the illustrative embodiments may be implemented;

FIG. 3 depicts an exemplary diagram of a Cell BE chip in which aspectsof the illustrative embodiments may be implemented;

FIG. 4 illustrates an exemplary thermal management system in accordancewith an illustrative embodiment;

FIG. 5 depicts a graph of temperature and the various points at whichinterrupts and dynamic throttling may occur in accordance with anillustrative embodiment;

FIG. 6 depicts a flow diagram of the operation for logging maximaltemperature in accordance with an illustrative embodiment;

FIG. 7 depicts a flow diagram of the operation for tracing thermal datavia performance monitoring in accordance with another illustrativeembodiment;

FIGS. 8A and 8B depict flow diagrams of the operation for advancedthermal interrupt generation in accordance with an additionalillustrative embodiment;

FIG. 9 depicts a flow diagram of the operation for support of deep powersavings mode and partial good in a thermal management system inaccordance with an additional illustrative embodiment;

FIG. 10 depicts a flow diagram of the operation for a thermal throttlecontrol feature which enables real-time testing of thermal awaresoftware applications independent of temperature in accordance with anadditional illustrative embodiment;

FIG. 11 depicts a flow diagram of the operation for an implementation ofthermal throttle control with minimal impact to interrupt latency inaccordance with an additional illustrative embodiment;

FIG. 12 depicts a flow diagram of the operation for hysteresis inthermal throttling in accordance with an additional illustrativeembodiment; and

FIG. 13 depicts a flow diagram of the operation of an implementation ofthermal throttling logic in accordance with an additional illustrativeembodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The illustrative embodiments relate to thermal throttling control fortesting of real-time software. FIGS. 1-2 are provided as exemplarydiagrams of data processing environments in which the illustrativeembodiments may be implemented. It should be appreciated that FIGS. 1-2are only exemplary and are not intended to assert or imply anylimitation with regard to the environments in which aspects orembodiments may be implemented. Many modifications to the depictedenvironments may be made without departing from the spirit and scope ofthe illustrative embodiments.

With reference now to the figures, FIG. 1 depicts a pictorialrepresentation of a network of data processing systems in which aspectsof the illustrative embodiments may be implemented. Network dataprocessing system 100 is a network of computers in which theillustrative embodiments may be implemented. Network data processingsystem 100 contains network 102, which is the medium used to providecommunications links between various devices and computers connectedtogether within network data processing system 100. Network 102 mayinclude connections, such as wire, wireless communication links, orfiber optic cables.

In the depicted example, server 104 and server 106 connect to network102 along with storage unit 108. In addition, clients 110, 112, and 114connect to network 102. These clients 110, 112, and 114 may be, forexample, personal computers or network computers. In the depictedexample, server 104 provides data, such as boot files, operating systemimages, and applications to clients 110, 112, and 114. Clients 110, 112,and 114 are clients to server 104 in this example. Network dataprocessing system 100 may include additional servers, clients, and otherdevices not shown.

In the depicted example, network data processing system 100 is theInternet with network 102 representing a worldwide collection ofnetworks and gateways that use the Transmission ControlProtocol/Internet Protocol (TCP/IP) suite of protocols to communicatewith one another. At the heart of the Internet is a backbone ofhigh-speed data communication lines between major nodes or hostcomputers, consisting of thousands of commercial, government,educational and other computer systems that route data and messages. Ofcourse, network data processing system 100 also may be implemented as anumber of different types of networks, such as for example, an intranet,a local area network (LAN), or a wide area network (WAN). FIG. 1 isintended as an example, and not as an architectural limitation fordifferent illustrative embodiments.

With reference now to FIG. 2, a block diagram of a data processingsystem is shown in which aspects of the illustrative embodiments may beimplemented. Data processing system 200 is an example of a computer,such as server 104 or client 110 in FIG. 1, in which computer usablecode or instructions implementing the processes for illustrativeembodiments may be located.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (MCH) 202and south bridge and input/output (I/O) controller hub (ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to north bridge and memory controller hub 202. Graphicsprocessor 210 may be connected to north bridge and memory controller hub202 through an accelerated graphics port (AGP).

In the depicted example, LAN adapter 212 connects to south bridge andI/O controller hub 204. Audio adapter 216, keyboard and mouse adapter220, modem 222, read only memory (ROM) 224, hard disk drive (HDD) 226,CD-ROM drive 230, universal serial bus (USB) ports and othercommunications ports 232, and PCI/PCIe devices 234 connect to southbridge and I/O controller hub 204 through bus 238 and bus 240. PCI/PCIedevices may include, for example, Ethernet adapters, add-in cards and PCcards for notebook computers. PCI uses a card bus controller, while PCIedoes not. ROM 224 may be, for example, a flash binary input/outputsystem (BIOS).

Hard disk drive 226 and CD-ROM drive 230 connect to south bridge and I/Ocontroller hub 204 through bus 240. Hard disk drive 226 and CD-ROM drive230 may use, for example, an integrated drive electronics (IDE) orserial advanced technology attachment (SATA) interface. Super I/O (SIO)device 236 may be connected to south bridge and I/O controller hub 204.

An operating system runs on processing unit 206 and coordinates andprovides control of various components within data processing system 200in FIG. 2. As a client, the operating system may be a commerciallyavailable operating system such as Microsoft® Windows® XP (Microsoft andWindows are trademarks of Microsoft Corporation in the United States,other countries, or both). An object-oriented programming system, suchas the Java™ programming system, may run in conjunction with theoperating system and provides calls to the operating system from Javaprograms or applications executing on data processing system 200 (Javais a trademark of Sun Microsystems, Inc. in the United States, othercountries, or both).

As a server, data processing system 200 may be, for example, an IBMeServer™ pSeries® computer system, running the Advanced InteractiveExecutive (AIX®) operating system or LINUX operating system (eServer,pSeries and AIX are trademarks of International Business MachinesCorporation in the United States, other countries, or both while Linuxis a trademark of Linus Torvalds in the United States, other countries,or both). Data processing system 200 may be a symmetric multiprocessor(SMP) system including a plurality of processors in processing unit 206.Alternatively, a single processor system may be employed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as hard disk drive 226, and may be loaded into main memory 208 forexecution by processing unit 206. The processes for the illustrativeembodiments are performed by processing unit 206 using computer usableprogram code, which may be located in a memory such as, for example,main memory 208, read only memory 224, or in one or more peripheraldevices 226 and 230.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1-2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1-2. Also, theprocesses of the illustrative embodiments may be applied to amultiprocessor data processing system.

In some illustrative examples, data processing system 200 may be apersonal digital assistant (PDA), which is configured with flash memoryto provide non-volatile memory for storing operating system files and/oruser-generated data.

A bus system may be comprised of one or more buses, such as bus 238 orbus 240 as shown in FIG. 2. Of course the bus system may be implementedusing any type of communications fabric or architecture that providesfor a transfer of data between different components or devices attachedto the fabric or architecture. A communications unit may include one ormore devices used to transmit and receive data, such as modem 222 ornetwork adapter 212 of FIG. 2. A memory may be, for example, main memory208, read only memory 224, or a cache such as found in north bridge andmemory controller hub 202 in FIG. 2. The depicted examples in FIGS. 1-2and above-described examples are not meant to imply architecturallimitations. For example, data processing system 200 also may be atablet computer, laptop computer, or telephone device in addition totaking the form of a PDA.

FIG. 3 depicts an exemplary diagram of a Cell BE chip in which aspectsof the illustrative embodiments may be implemented. Cell BE chip 300 isa single-chip multiprocessor implementation directed toward distributedprocessing targeted for media-rich applications such as game consoles,desktop systems, and servers.

Cell BE chip 300 may be logically separated into the followingfunctional components: Power PC® processor element (PPE) 301,synergistic processor units (SPUs) 310, 311, and 312, and memory flowcontrollers (MFCs) 305, 306, and 307. Although synergistic processorelements (SPEs) 302, 303, and 304 and PPE 301 are shown by example, anytype of processor element may be supported. Exemplary Cell BE chip 300implementation includes one PPE 301 and eight SPEs, although FIG. 3shows only three SPEs 302, 303, and 304. The SPE of a CELL Processor isa first implementation of a new processor architecture designed toaccelerate media and data streaming workloads.

Cell BE chip 300 may be a system-on-a-chip such that each of theelements depicted in FIG. 3 may be provided on a single microprocessorchip. Moreover, Cell BE chip 300 is a heterogeneous processingenvironment in which each of SPUs 310, 311, and 312 may receivedifferent instructions from each of the other SPUs in the system.Moreover, the instruction set for SPUs 310, 311, and 312 is differentfrom that of Power PC® processor unit (PPU) 308, e.g., PPU 308 mayexecute Reduced Instruction Set Computer (RISC) based instructions inthe Power™ architecture while SPUs 310, 311, and 312 execute vectorizedinstructions.

Each SPE includes one SPU 310, 311, or 312 with its own local store (LS)area 313, 314, or 315 and a dedicated MFC 305, 306, or 307 that has anassociated memory management unit (MMU) 316, 317, or 318 to hold andprocess memory protection and access permission information. Once again,although SPUs are shown by example, any type of processor unit may besupported. Additionally, Cell BE chip 300 implements elementinterconnect bus (EIB) 319 and other I/O structures to facilitateon-chip and external data flow.

EIB 319 serves as the primary on-chip bus for PPE 301 and SPEs 302, 303,and 304. In addition, EIB 319 interfaces to other on-chip interfacecontrollers that are dedicated to off-chip accesses. The on-chipinterface controllers include the memory interface controller (MIC) 320,which provides two extreme data rate I/O (XIO) memory channels 321 and322, and Cell BE interface unit (BEI) 323, which provides two high-speedexternal I/O channels and the internal interrupt control for Cell BE300. BEI 323 is implemented as bus interface controllers (BICs, labeledBIC0 & BIC1) 324 and 325 and I/O interface controller (IOC) 326. The twohigh-speed external I/O channels connected to a polarity of RedwoodRambus® Asic Cell (RRAC) interfaces providing the flexible input andoutput (FlexIO_0 & FlexIO_1) 353 for the Cell BE 300.

Each SPU 310, 311, or 312 has a corresponding LS area 313, 314, or 315and synergistic execution units (SXU) 354, 355, or 356. Each individualSPU 310, 311, or 312 can execute instructions (including data load andstore operations) only from within its associated LS area 313, 314, or315. For this reason, MFC direct memory access (DMA) operations viaSPU's 310, 311, and 312 dedicated MFCs 305, 306, and 307 perform allrequired data transfers to or from storage elsewhere in a system.

A program running on SPU 310, 311, or 312 only references its own LSarea 313, 314, or 315 using a LS address. However, each SPU's LS area313, 314, or 315 is also assigned a real address (RA) within the overallsystem's memory map. The RA is the address for which a device willrespond. In the Power PC®, an application refers to a memory location(or device) by an effective address (EA), which is then mapped into avirtual address (VA) for the memory location (or device) which is thenmapped into the RA. The EA is the address used by an application toreference memory and/or a device. This mapping allows an operatingsystem to allocate more memory than is physically in the system (i.e.the term virtual memory referenced by a VA). A memory map is a listingof all the devices (including memory) in the system and theircorresponding RA. The memory map is a map of the real address spacewhich identifies the RA for which a device or memory will respond.

This allows privileged software to map a LS area to the EA of a processto facilitate direct memory access transfers between the LS of one SPUand the LS area of another SPU. PPE 301 may also directly access anySPU's LS area using an EA. In the Power PC® there are three states(problem, privileged, and hypervisor). Privileged software is softwarethat is running in either the privileged or hypervisor states. Thesestates have different access privileges. For example, privilegedsoftware may have access to the data structures register for mappingreal memory into the EA of an application. Problem state is the statethe processor is usually in when running an application and usually isprohibited from accessing system management resources (such as the datastructures for mapping real memory).

The MFC DMA data commands always include one LS address and one EA. DMAcommands copy memory from one location to another. In this case, an MFCDMA command copies data between an EA and a LS address. The LS addressdirectly addresses LS area 313, 314, or 315 of associated SPU 310, 311,or 312 corresponding to the MFC command queues. Command queues arequeues of MFC commands. There is one queue to hold commands from the SPUand one queue to hold commands from the PXU or other devices. However,the EA may be arranged or mapped to access any other memory storage areain the system, including LS areas 313, 314, and 315 of the other SPEs302, 303, and 304.

Main storage (not shown) is shared by PPU 308, PPE 301, SPEs 302, 303,and 304, and I/O devices (not shown) in a system, such as the systemshown in FIG. 2. All information held in main memory is visible to allprocessors and devices in the system. Programs reference main memoryusing an EA. Since the MFC proxy command queue, control, and statusfacilities have RAs and the RA is mapped using an EA, it is possible fora power processor element to initiate DMA operations, using an EAbetween the main storage and local storage of the associated SPEs 302,303, and 304.

As an example, when a program running on SPU 310, 311, or 312 needs toaccess main memory, the SPU program generates and places a DMA command,having an appropriate EA and LS address, into its MFC 305, 306, or 307command queue. After the command is placed into the queue by the SPUprogram, MFC 305, 306, or 307 executes the command and transfers therequired data between the LS area and main memory. MFC 305, 306, or 307provides a second proxy command queue for commands generated by otherdevices, such as PPE 301. The MFC proxy command queue is typically usedto store a program in local storage prior to starting the SPU. MFC proxycommands can also be used for context store operations.

The EA address provides the MFC with an address which can be translatedinto a RA by the MMU. The translation process allows for virtualizationof system memory and access protection of memory and devices in the realaddress space. Since LS areas are mapped into the real address space,the EA can also address all the SPU LS areas.

PPE 301 on Cell BE chip 300 consists of 64-bit PPU 308 and Power PC®storage subsystem (PPSS) 309. PPU 308 contains processor execution unit(PXU) 329, level 1 (L1) cache 330, MMU 331 and replacement managementtable (RMT) 332. PPSS 309 consists of cacheable interface unit (CIU)333, non-cacheable unit (NCU) 334, level 2 (L2) cache 328, RMT 335 andbus interface unit (BIU) 327. BIU 327 connects PPSS 309 to EIB 319.

SPU 310, 311, or 312 and MFCs 305, 306, and 307 communicate with eachother through unidirectional channels that have capacity. Channels areessentially a FIFO which are accessed using one of 34 SPU instructions;read channel (RDCH), write channel (WRCH), and read channel count(RDCHCNT). The RDCHCNT returns the amount of information in the channel.The capacity is the depth of the FIFO. The channels transport data toand from MFCs 305, 306, and 307, SPUs 310, 311, and 312. BIUs 339, 340,and 341 connect MFCs 305, 306, and 307 to EIB 319.

MFCs 305, 306, and 307 provide two main functions for SPUs 310, 311, and312. MFCs 305, 306, and 307 move data between SPUs 310, 311, or 312, LSarea 313, 314, or 315, and main memory. Additionally, MFCs 305, 306, and307 provide synchronization facilities between SPUs 310, 311, and 312and other devices in the system.

MFCs 305, 306, and 307 implementation has four functional units: directmemory access controllers (DMACs) 336, 337, and 338, MMUs 316, 317, and318, atomic units (ATOs) 342, 343, and 344, RMTs 345, 346, and 347, andBIUs 339, 340, and 341. DMACs 336, 337, and 338 maintain and process MFCcommand queues (MFC CMDQs) (not shown), which consist of a MFC SPUcommand queue (MFC SPUQ) and a MFC proxy command queue (MFC PrxyQ). Thesixteen-entry, MFC SPUQ handles MFC commands received from the SPUchannel interface. The eight-entry, MFC PrxyQ processes MFC commandscoming from other devices, such as PPE 301 or SPEs 302, 303, and 304,through memory mapped input and output (MMIO) load and store operations.A typical direct memory access command moves data between LS area 313,314, or 315 and the main memory. The EA parameter of the MFC DMA commandis used to address the main storage, including main memory, localstorage, and all devices having a RA. The local storage parameter of theMFC DMA command is used to address the associated local storage.

In a virtual mode, MMUs 316, 317, and 318 provide the addresstranslation and memory protection facilities to handle the EAtranslation request from DMACs 336, 337, and 338 and send back thetranslated address. Each SPE's MMU maintains a segment lookaside buffer(SLB) and a translation lookaside buffer (TLB). The SLB translates an EAto a VA and the TLB translates the VA coming out of the SLB to a RA. TheEA is used by an application and is usually a 32- or 64-bit address.Different application or multiple copies of an application may use thesame EA to reference different storage locations (for example, twocopies of an application each using the same EA, will need two differentphysical memory locations.) To accomplish this, the EA is firsttranslated into a much larger VA space which is common for allapplications running under the operating system. The EA to VAtranslation is performed by the SLB. The VA is then translated into a RAusing the TLB, which is a cache of the page table or the mapping tablecontaining the VA to RA mappings. This table is maintained by theoperating system.

ATOs 342, 343, and 344 provide the level of data caching necessary formaintaining synchronization with other processing units in the system.Atomic direct memory access commands provide the means for the synergistprocessor elements to perform synchronization with other units.

The main function of BIUs 339, 340, and 341 is to provide SPEs 302, 303,and 304 with an interface to the EIB. EIB 319 provides a communicationpath between all of the processor cores on Cell BE chip 300 and theexternal interface controllers attached to EIB 319.

MIC 320 provides an interface between EIB 319 and one or two of XIOs 321and 322. Extreme data rate (XDR™) dynamic random access memory (DRAM) isa high-speed, highly serial memory provided by Rambus®. A macro providedby Rambus accesses the extreme data rate dynamic random access memory,referred to in this document as XIOs 321 and 322.

MIC 320 is only a slave on EIB 319. MIC 320 acknowledges commands in itsconfigured address range(s), corresponding to the memory in thesupported hubs.

BICs 324 and 325 manage data transfer on and off the chip from EIB 319to either of two external devices. BICs 324 and 325 may exchangenon-coherent traffic with an I/O device, or it can extend EIB 319 toanother device, which could even be another Cell BE chip. When used toextend EIB 319, the bus protocol maintains coherency between caches inthe Cell BE chip 300 and the caches in the attached external device,which could be another Cell BE chip.

IOC 326 handles commands that originate in an I/O interface device andthat are destined for the coherent EIB 319. An I/O interface device maybe any device that attaches to an I/O interface such as an I/O bridgechip that attaches multiple I/O devices or another Cell BE chip 300 thatis accessed in a non-coherent manner. IOC 326 also intercepts accesseson EIB 319 that are destined to memory-mapped registers that reside inor behind an I/O bridge chip or non-coherent Cell BE chip 300, androutes them to the proper I/O interface. IOC 326 also includes internalinterrupt controller (IIC) 349 and I/O address translation unit (I/OTrans) 350.

Pervasive logic 351 is a controller that provides the clock management,test features, and power-on sequence for the Cell BE chip 300. Pervasivelogic may provide the thermal management system for the processor.Pervasive logic contains a connection to other devices in the systemthrough a Joint Test Action Group (JTAG) or Serial Peripheral Interface(SPI) interface, which are commonly known in the art.

Although specific examples of how the different components may beimplemented have been provided, this is not meant to limit thearchitecture in which the aspects of the illustrative embodiments may beused. The aspects of the illustrative embodiments may be used with anymulti-core processor system.

During the execution of an application or software, the temperature ofareas within the Cell BE chip may rise. Left unchecked, the temperaturecould rise above the maximal specified junction temperature, leading toimproper operation or physical damage. To avoid these conditions, theCell BE chip's digital thermal management unit monitors and attempts tocontrol the temperature within the Cell BE chip during operation. Thedigital thermal management unit consists of a thermal management controlunit (TMCU) and ten distributed digital thermal sensors (DTSs) describedherein.

One sensor is located in each of the eight SPEs, one is located in thePPE, and one is adjacent to a linear thermal diode. The linear thermaldiode is an on-chip diode that calculates temperature. These sensors arepositioned adjacent to areas within the associated unit that typicallyexperience the greatest rise in temperature during the execution of mostapplications. The thermal control unit monitors feedback from each ofthese sensors. If the temperature of a sensor rises above a programmablepoint, the thermal control unit can be configured to cause an interruptto the PPE or one or more of the SPEs and dynamically throttle theexecution of the associated PPE or SPE(s).

Stopping and running the PPE or SPE for a programmable number of cyclesprovides the necessary throttling. The interrupt allows privilegedsoftware to take corrective action while the dynamic throttling attemptsto keep the temperature within the broadband engine chip below aprogrammable level without software intervention. Privileged softwaresets the throttling level equal to or below recommended settingsprovided by the application. Each application may be different.

If throttling the PPE or SPEs does not effectively manage thetemperature and the temperature continues to rise, pervasive logic 351stops the Cell BE chip's clocks when the temperature reaches a thermaloverload temperature (defined by programmable configuration data). Thethermal overload feature protects the Cell BE chip from physical damage.Recovery from this condition requires a hard reset. The temperature ofthe region monitored by the DTSs is not necessarily the hottest pointwithin the associated PPE or SPE.

FIG. 4 illustrates an exemplary thermal management system in accordancewith an illustrative embodiment. The thermal management system may beimplemented as an integrated circuit, such as that as provided bypervasive logic unit 351 of FIG. 3. The thermal management system may bean application specific integrated circuit, a processor, amultiprocessor, or a heterogeneous multi-core processor. The thermalmanagement system is divided between ten distributed DTSs, forsimplicity only DTSs 404, 406, 408, and 410 are shown, and thermalmanagement control unit (TMCU) 402. Each of DTS 404 and 406, which arein SPU sensors 440, DTS 408, which is in PPU sensor 442, and DTS 410,which is in sensor 444 that is adjacent to a linear thermal diode (notshown), provide a current temperature detection signal. This signalindicates that the temperature is equal to or below the currenttemperature detection range set by TMCU 402. TMCU 402 uses the state ofthe signals from DTSs 404, 406, 408, and 410 to continually track thetemperature of each PPE's or SPE's DTSs 404, 406, 408, or 410. As thetemperature is tracked, TMCU 402 provides the current temperature as anumeric value that represents the temperature within the associated PPEor SPE. The manufacturing to calibrate the individual sensors setsinternal calibration storage 428.

In addition to the elements of TMCU 402 described above, TMCU 402 alsocontains multiplexers 446 and 450, work registers 448, comparators 452and 454, serializer 456, thermal management control state machine 458,and data flow (DF) unit 460. Multiplexers 446 and 450 combine variousoutgoing and incoming signals for transmission over a single medium.Work registers 448 hold the results of multiplications performed in TMCU402. Comparators 452 and 454 provide a comparison function of twoinputs. Comparator 452 is a greater than or equal to comparator.Comparator 454 is a greater than comparator. Serializer 456 convertslow-speed parallel data from a source into high-speed serial data fortransmission. Serializer 456 works in conjunction with deserializers 462and 464 on SPU sensors 440. Deserializers 462 and 464 converts receivedhigh-speed serial data into low-speed parallel data. Thermal managementcontrol state machine 458 starts the internal initialization of TMCU402. DF unit 460 controls the data to and from thermal managementcontrol state machine 458.

TMCU 402 may be configured to cause an interrupt to the PPE, usinginterrupt logic 416, to dynamically throttle the execution of a PPE or aSPE, using throttling logic 418.

TMCU 402 compares the numeric value representing the temperature to aprogrammable interrupt temperature and a programmable throttle point.Each DTS has an independent programmable interrupt temperature. If thetemperature is within the programmed interrupt temperature range, TMCU402 generates an interrupt to the PPE, if enabled. An interrupt isgenerated if the temperature is above or below the programmed leveldepending on the direction bit, described later. In addition, a secondprogrammable interrupt temperature may cause the assertion of anattention signal to a system controller. The system controller is on thesystem planer and is connected to the Cell BE on the SPI port.

If the temperature sensed by the DTS associated with the PPE or SPE isequal to or above the throttling point, TMCU 402 throttles the executionof a PPE or one or more SPEs by starting and stopping that PPE or SPEindependently. Software can control the ratio and frequency of thethrottling using thermal management registers, such as thermalmanagement stop time registers and thermal management scale registers.

FIG. 5 depicts a graph of temperature and the various points at whichinterrupts and dynamic throttling may occur in accordance with anillustrative embodiment. In FIG. 5, line 500 may represent thetemperature for the PPE or the SPE. If the PPE or SPE is runningnormally, there is no throttling in the regions marked with an “N.” Whenthe temperature of a PPE or SPE reaches the throttle point, the TMCUstarts throttling the execution of the associated PPE or SPE. Theregions in which the throttling occurs are marked with a “T.” When thetemperature of the PPE or SPE drops below the end throttle point, theexecution returns to normal operation.

If, for any reason, the temperature continues to rise and reaches atemperature at or above the full throttle point, TMCU 402 stops the PPEor SPE until the temperature drops below the full throttle point.Regions where the PPE or SPE is stopped are marked with an “S.” Stoppingthe PPE or SPEs when the temperature is at or above the full throttlepoint is referred to as the core stop safety.

In this exemplary illustration, the interrupt temperature is set abovethe throttle point; therefore, TMCU 402 generates an interrupt which isa notification to the software that the corresponding PPE or SPEs isstopped because the temperature was or is still above the core stoptemperature; provided that the thermal interrupt mask register (TM_ISR)is set to active, see 422 in FIG. 4, allowing the PPE or SPE to resumeduring a pending interrupt. If dynamic throttling is disabled,privileged software manages the thermal condition. Not managing thethermal condition can result in an improper operation of the associatedPPE or SPE or a thermal shutdown by the thermal overload function.

Returning to FIG. 4, the thermal sensor status registers consist ofthermal sensor current temperature status registers 412 and thermalsensor maximum temperature status registers 414. These registers allowsoftware to read the current temperature of each DTS, determine thehighest temperature reached during a period of time, and cause aninterrupt when the temperature reaches a programmable temperature. Thethermal sensor status registers have associated real address pages whichmay be marked as hypervisor privileged.

Thermal sensor current temperature status registers 412 contain theencoding or digital value for the current temperature of each DTS. Dueto latencies in the sensor's temperature detection, latencies in readingthese registers, and normal temperature fluctuations, the temperaturereported in these registers is that of an earlier point in time andmight not reflect the actual temperature when software receives thedata. As each sensor has dedicated control logic, control logic withinDTSs 404, 406, 408, and 410 samples all sensors in parallel. TMCU 402updates the contents of thermal sensor current temperature statusregisters 412 at the end of the sample period. TMCU 402 changes thevalue in thermal sensor current temperature status registers 412 to thecurrent temperature. TMCU 402 polls for new current temperatures everySenSampTime period. A SenSampTime configuration field controls thelength of a sample period.

Thermal sensor maximum temperature status registers 414 contain thedigitally encoded maximal temperature reached for each sensor from thetime thermal sensor maximum temperature status registers 414 were lastread. Reading these registers, by software or any off-chip device, suchas off-chip device 472 or off-chip I/O device 474, causes TMCU 402 tocopy the current temperature for each sensor into the register. Afterthe read, TMCU 402 continues to track the maximal temperature startingfrom this point. Each register's read is independent. A read of oneregister does not affect the contents of the other.

Each sensor has dedicated control logic, so control logic within DTSs404, 406, 408, and 410 samples all sensors in parallel. TMCU 402 changesthe value in thermal sensor maximum temperature status registers 414 tothe current temperature. TMCU 402 polls for new current temperaturesevery SenSampTime period. A SenSampTime configuration field controls thelength of a sample period.

Thermal sensor interrupt registers in interrupt logic 416 control thegeneration of a thermal management interrupt to the PPE. This set ofregisters consists of thermal sensor interrupt temperature registers 420(TS_ITR1 and TS_ITR2), thermal sensor interrupt status register 422(TS_ISR), thermal sensor interrupt mask register 424 (TS_IMR), and thethermal sensor global interrupt temperature register 426 (TS_GITR).Thermal sensor interrupt temperature registers 420 and the thermalsensor global interrupt temperature register 426 contain the encodingfor the temperature that causes a thermal management interrupt to thePPE.

When the temperature, encoded in a digital format, in thermal sensorcurrent temperature status registers 412 for a sensor is greater than orequal to the corresponding sensor's interrupt temperature encoding inthermal sensor interrupt temperature registers 420, TMCU 402 sets thecorresponding status bit in thermal sensor interrupt status register 422(TS_ISR[Sx]). When the temperature encoding in thermal sensor currenttemperature status registers 412 for any sensor is greater than or equalto the global interrupt temperature encoding in thermal sensor globalinterrupt temperature register 426, TMCU 402 sets the correspondingstatus bits in thermal sensor interrupt status register 422(TS_ISR[Gx]).

If any thermal sensor interrupt temperature status register 422 bit(TS_ISR[Sx]) is set and the corresponding mask bit in the thermal sensorinterrupt mask register 424 (TS_IMR[Mx]) is also set, TMCU 402 asserts athermal management interrupt signal to the PPE. If any thermal sensorinterrupt status register 422 (TS_ISR[Gx]) bit is set and thecorresponding mask bit in the thermal sensor interrupt mask register 424(TS_IMR[Cx]) is also set, TMCU 402 asserts a thermal managementinterrupt signal to the PPE.

To clear the interrupt condition, privileged software should set anycorresponding mask bits in thermal sensor interrupt mask register to‘0’. To enable a thermal management interrupt, privileged softwareensures that the temperature is below the interrupt temperature for thecorresponding sensors and then performs the following sequence. Enablingan interrupt when the temperature is not below the interrupt temperaturecan result in an immediate thermal management interrupts beinggenerated.

-   -   1. Write a ‘1’ to the corresponding status bit in the thermal        sensor interrupt status register 422.    -   2. Write a ‘1’ to the corresponding mask bit in the thermal        sensor interrupt mask register 424.

The thermal sensor interrupt temperature registers 420 contain theinterrupt temperature level for the sensors located in the SPEs, PPE,and adjacent to the linear thermal diode. TMCU 402 compares the encodedinterrupt temperature levels in this register to the correspondinginterrupt temperature encoding in the thermal sensor current temperaturestatus registers 412. The results of these comparisons generate athermal management interrupt. Each sensor's interrupt temperature levelis independent.

In addition to the independent interrupt temperature levels set in thethermal sensor interrupt temperature registers 420; the thermal sensorglobal interrupt temperature register 426 contains a second interrupttemperature level. This level applies to all sensors in the Cell BEchip. TMCU 402 compares the encoded global interrupt temperature levelin this register to the current temperature encoding for each sensor.The results of these comparisons generate a thermal managementinterrupt.

The intent of the global interrupt temperature is to provide an earlyindication to a temperature rise in the Cell BE chip. Privilegedsoftware and the system controller may use this information to startactions to control the temperature, for example, increasing the fanspeed, rebalancing the application software across units, and so on.

Thermal sensor interrupt status register 422 identifies which sensorsmeet the interrupt conditions. An interrupt condition refers to aparticular condition that each thermal sensor interrupt status register422 bit has that, when met, makes it possible for an interrupt to occur.An actual interrupt is only presented to the PPE if the correspondingmask bit is set.

Thermal sensor interrupt status register 422 contains three sets ofstatus bits—the digital sensor global threshold interrupt status bit(TS_ISR[Gx]), the digital sensor threshold interrupt status bit(TS_ISR[Sx]), and the digital sensor global below threshold interruptstatus bit (TS_ISR[Gb]).

TMCU 402 sets the status bit in thermal sensor interrupt status register422 (TS_ISR[Sx]) when the temperature encoding for a sensor in thermalsensor current temperature status registers 412 is greater than or equalto the corresponding sensor's interrupt temperature encoding in thermalsensor interrupt temperature registers 420 and the correspondingdirection bit thermal sensor interrupt mask register 424,TM_IMR[Bx]=‘1’. Additionally, TMCU 402 sets thermal sensor interruptstatus register 422, TS_ISR[Sx], when the temperature encoding for asensor in thermal sensor current temperature status registers 412 isbelow the corresponding sensor's interrupt temperature encoding inthermal sensor interrupt temperature registers 420 and the correspondingdirection bit thermal sensor interrupt mask register 424,TM_IMR[Bx]=‘1’.

TMCU 402 sets thermal sensor interrupt status register 422, TS_ISR[Gx],when any participating sensor's current temperature is greater than orequal to that of thermal sensor global interrupt temperature register426 and thermal sensor interrupt mask register 424, TS_IMR[B_(G)], to‘0’. The individual thermal sensor interrupt status register 422,TS_ISR[Gx], bits indicate which individual sensors meet theseconditions.

TMCU 402 sets thermal sensor interrupt status register 422, TS_ISR[Gb],when all of the participating sensors in thermal sensor interrupt maskregister 424, TS_IMR[Cx], have a current temperature below that ofthermal sensor global interrupt temperature register 426 and the thermalsensor interrupt mask register 424, TS_IMR[B_(G)], to ‘1’. Since allparticipating sensors have a current temperature below that of thethermal sensor global interrupt temperature register 426, only onestatus bit thermal sensor interrupt status register 422 (TS_ISR[Gb]) ispresent for a global below threshold interrupt condition.

Once a status bit in the thermal sensor interrupt status register 422(TS_ISR[Sx], [Gx], or [Gb]) is set to ‘1’, TMCU 402 maintains this stateuntil reset to ‘0’ by privileged software. Privileged software resets astatus bit to ‘0’ by writing a ‘1’ to the corresponding bit in thermalsensor interrupt status register 422.

The thermal sensor interrupt mask register 424 contains two fields forindividual sensors and multiple fields for global interrupt conditions.An interrupt condition refers to a particular condition that eachthermal sensor interrupt mask register 424 bit has that, when met, makesit possible for an interrupt to occur. An actual interrupt is onlypresented to the PPE if the corresponding mask bit is set.

The two thermal sensor interrupt mask register digital thermal thresholdinterrupt fields for individual sensors are TS_IMR[Mx] and theTS_IMR[Bx]. Thermal sensor interrupt mask register 424, TS_IMR[Mx], maskbits prevent an interrupt status bit from generating a thermalmanagement interrupt to the PPE. Thermal sensor interrupt mask register424, TS_IMR[Bx], directional bits set the temperature direction for theinterrupt condition above or below the corresponding temperature inthermal sensor interrupt temperature registers 420. Setting thermalsensor interrupt mask register 424, TS_IMR[Bx], to ‘1’ sets thetemperature for the interrupt condition to be below the correspondingtemperature in thermal sensor interrupt temperature registers 420.Setting thermal sensor interrupt mask register 424, TS_IMR[Bx], to ‘0’sets the temperature for the interrupt condition to be equal to or abovethe corresponding temperature in thermal sensor interrupt temperatureregisters 420.

Thermal sensor interrupt mask register 424 fields for the globalinterrupt conditions are TS_IMR[Cx], TS_IMR[B_(G)], TS_IMR[Cgb], andTS_IMR[A]. Thermal sensor interrupt mask register 424, TS_IMR[Cx], maskbits prevent global threshold interrupts and select which sensorsparticipate in the global below threshold interrupt condition. Thermalsensor interrupt mask register 424, TS_IMR[B_(G)], directional bitselects the temperature direction for the global interrupt condition.Thermal sensor interrupt mask register 424, TS_IMR[Cgb], mask bitprevents global below threshold interrupts. Thermal sensor interruptmask register 424, TS_IMR[A], asserts an attention to the systemcontroller. An attention is a signal to the system controller indicatingthat the pervasive logic needs attention or has status for the systemcontroller. The attention may be mapped to an interrupt in the systemcontroller. The system controller is on the system planer and isconnected to the Cell Broadband Engine on the SPI port.

Setting thermal sensor interrupt mask register 424, TS_IMR[B_(G)], to‘1’ sets a temperature range for the global interrupt condition to occurwhen the temperatures of all the participating sensors set in thermalsensor interrupt mask register 424, TS_IMR[Cx], are below the globalinterrupt temperature level. Setting thermal sensor interrupt maskregister 424, TS_IMR[B_(G)], to ‘0’ sets a temperature range for theglobal interrupt condition to occur when the temperature of any of theparticipating sensors is greater than or equal to the correspondingtemperature in thermal sensor global interrupt temperature register 426.If thermal sensor interrupt mask register 424, TS_IMR[A], is set to ‘1’,TMCU 402 asserts an attention when any thermal sensor interrupt maskregister 424, TS_IMR[Cx], bit and its corresponding thermal sensorinterrupt status register 422 status bit (TS_ISR[Gx]) are both set to‘1’. Additionally, TMCU 402 asserts an attention when thermal sensorinterrupt mask register 424, TS_IMR[Cgb], and thermal sensor interruptstatus register 422, TS_ISR[Gb], are both set to ‘1’.

TMCU 402 presents a thermal management interrupt to the PPE when anythermal sensor interrupt mask register 424, TS_IMR[Mx], bit and itscorresponding thermal sensor interrupt status register 422 status bit(TS_ISR[Sx]) are both set to ‘1’. TMCU 402 generates a thermalmanagement interrupt when any thermal sensor interrupt mask register424, TS_IMR[Cx], bit and its corresponding thermal sensor interruptstatus register 422 status bit, TS_ISR[Gx], are both set to ‘1’.Additionally, TMCU 402 presents a thermal management interrupt to thePPE when thermal sensor interrupt mask register 424, TS_IMR[Cgb], andthermal sensor interrupt status register 422, TS_ISR[Gb], are both setto ‘1’.

The dynamic thermal management registers in throttling logic 418 containparameters for controlling the execution throttling of a PPE or a SPE.Dynamic thermal management registers is a set of registers that containsthermal management control registers 430 (TM_CR1 and TM_CR2), thermalmanagement throttle point register 432 (TM_TPR), thermal management stoptime registers 434 (TM_STR1 and TM_STR2), thermal management throttlescale register 436 (TM_TSR), and thermal management system interruptmask register 438 (TM_SIMR).

Thermal management throttle point register 432 sets the throttletemperature point for the sensors. Two independent throttle temperaturepoints can be set in thermal management throttle point register 432,ThrottlePPE and ThrottleSPE, one for the PPE and one for the SPEs. Alsocontained in this register are temperature points for disablingthrottling and stopping the PPE or SPEs. Execution throttling of a PPEor a SPE starts when the temperature is equal to or above the throttlepoint. Throttling ceases when the temperature drops below thetemperature to disable throttling(TM_TPR[EndThrottlePPE/EndThrottleSPE]). If the temperature reaches thefull throttle or stop temperature(TM_TPR[FullThrottlePPE/FullThrottleSPE]), TMCU 402 stops the executionof the PPE or SPE. Thermal management control registers 430 control thethrottling behavior.

Thermal management stop time registers 434 and thermal managementthrottle scale register 436 control the frequency and amount ofthrottling. When the temperature reaches the throttle point, TMCU 402stops the corresponding PPE or SPE for the number of clocks specified bythe stop time in the corresponding value in thermal management stop timeregisters 434, multiplied by the corresponding scale value in thermalmanagement scale register 436. TMCU 402 then allows the PPE or SPE torun for the number of clocks specified by the run time multiplied by thecorresponding scale value, where the run time is the difference betweenan implementation dependent fixed amount of time minus the stop time.The scale value, which is programmable, in thermal management scaleregister 436 is a multiplier for both the stop time and run time. Anexamples may be (Stop×Scale)/(Run×Scale). The percentage of time a coreis stopped remains the same, but the period is increased or frequency isdecreased. This sequence continues until the temperature falls below thedisable throttling (TM_TPR[EndThrottlePPE/EndThrottleSPE]).

Thermal management system interrupt mask register 438 selects which PPEinterrupts will cause TMCU 402 to disable throttling. TMCU 402 willcontinue to prevent throttling while these interrupts are still pendingand the mask is still selecting the pending interrupt. If the mask isdeselected or the interrupt is no longer pending, TMCU 402 will nolonger prevent throttling.

Thermal management control registers 430 set the throttling mode foreach PPE or SPE independently. The control bits are split between tworegisters. Following are the five different modes that may be set foreach PPE or SPE independently:

-   -   Dynamic throttling disabled (including the core stop safety).    -   Normal operation (dynamic throttling and the core stop safety        are enabled).    -   PPE or SPE is always throttled (core stop safety is enabled).    -   Core stop safety disabled (dynamic throttling enabled and the        core stop safety are disabled).    -   PPE or SPE is always throttled and core stop safety disabled.

Privileged software should set control bits to normal operation for PPEor SPEs that are running applications or operating systems. If a PPE ora SPE is not running application code, privileged software should setthe control bits to disabled. The “PPE or SPE is always throttled” modesare intended for application development. These modes are useful todetermine if the application can operate under an extreme throttlingcondition. Allowing a PPE or a SPE to execute with either the dynamicthrottling or core stop safety disabled should only be permitted whenprivileged software actively manages the thermal events.

Thermal management system interrupt mask register 438 controls which PPEinterrupts cause the thermal management logic to temporarily stopthrottling the PPE. TMCU 402 temporarily suspends throttling for boththreads while the interrupt is pending, regardless of the threadtargeted by the interrupt. When the interrupt is no longer pending,throttling may resume as long as throttle conditions still exist.Throttling of the SPEs is never disabled based on a system interruptcondition. The PPE interrupt conditions that can override a throttlingcondition are as follows:

-   -   External    -   Decrementer    -   Hypervisor Decrementer    -   System Error    -   Thermal Management

Thermal management throttle point register 432 contains the encodedtemperature points at which execution throttling of a PPE or a SPEbegins and ends. This register also contains encoded temperature pointsat which a PPE's or a SPE's execution is fully throttled.

Software uses the values in the thermal management throttle pointregister to set three temperature points for changing between the threethermal management states: normal run (N), PPE or SPE throttled (T), andPPE or SPE stopped (S). TMCU 402 supports independent temperature pointsfor the PPE and the SPEs.

When the encoded current temperature of a sensor in thermal sensorcurrent temperature status registers 412 is equal to or greater than thethrottle temperature (ThrottlePPE/ThrottleSPE), execution throttling ofthe corresponding PPE or SPE begins, if enabled. Execution throttlingcontinues until the encoded current temperature of the correspondingsensor is less than the encoded temperature to end throttling(EndThrottlePPE/EndThrottleSPE). As a safety measure, if the encodedcurrent temperature is equal to or greater than the full throttle point(FullThrottlePPE/FullThrottleSPE), TMCU 402 stops the corresponding PPEor SPE.

Thermal management stop time registers 434 control the amount ofthrottling applied to a specific PPE or SPE in the thermal managementthrottled state. The value, which is set by software, in the thermalmanagement stop time registers 434 represents the amount of time thecore will be stopped relative to the amount of time the core is allowedto run (stop/run) or the percentage of time the core is stopped. Thethermal management throttle scale register 436 controls the actualnumber of clocks (NClks) that a PPE or a SPE stops and runs.

Thermal management throttle scale register 436 controls the actualnumber of cycles that a PPE or a SPE stops and runs during the thermalmanagement throttle state. The values in this register are multiples ofa configuration ring setting TM_Config[MinStopSPE]. The followingequation calculates the actual number of stop and run cycles: SPE Runand Stop Time:  SPE_StopTime = (TM_STR1[StopCore(x)] *  TM_Config[MinStopSPE]) * TM_TSR[ScaleSPE]  SPE_RunTime = (32 −TM_STR1[StopCore(x)]) *   TM_Config[MinStopSPE]) * TM_TSR[ScaleSPE]Power PC ® element Run and Stop Time:  PPE_StopTime =(TM_STR2[StopCore(8)] *   TM_Config[MinStopPPE]) * TM_TSR[ScalePPE] PPE_RunTime = (32 − TM_STR2[StopCore(8)]) *   TM_Config[MinStopPPE]) *TM_TSR[ScalePPE]

The run and stop times can be altered by interrupts and privilegedsoftware writing various thermal management registers.

On-chip performance monitor 466 may provide performance monitoring thatmay trace thermal data provided by temperature sensing devices, such asDTSs 404, 406, 408, and 410. The thermal data may be stored in memory470 or written to off-chip device 472, such as main memory 208 of FIG.2, or to an off-chip I/O device 474, such as south bridge andinput/output (I/O) controller hub (ICH) 204 of FIG. 2. Controller 468located in performance monitor 466 controls the determination of wherethe thermal data is sent.

Although the following descriptions are directed to one instructionstream and one processor, the instruction stream may be a set ofinstruction streams, and the processor may be a set of processors. Thatis, a set may be just a single instruction stream and single processoror two or more instructions streams and processors.

Utilizing the above described architecture, many improvements and addedprogrammability are made for the thermal management and thermalthrottling of the Cell BE chip. Some of these improvements and addedprogrammability enable key features why others enhance usability.

FIG. 6 depicts a flow diagram of the operation for logging maximaltemperature in accordance with an illustrative embodiment. As theoperation begins, the computer system which contains a Cell BE chip,such as Cell BE chip 300 of FIG. 3, starts or resets (step 602). Aspreviously described, the Cell BE chip includes a thermal managementsystem that is provided through pervasive logic unit 351 of FIG. 3. Thethermal management system includes one set of maximum temperature statusregisters and one set of current temperature status registers, such asmaximum temperature status registers 414 and current temperature statusregisters 412 of FIG. 4, for each DTS, such as DTSs 404, 406, 408, and410 of FIG. 4. The current temperature status register stores thecurrent temperature of its target DTS since the last time thermalmanagement control state machine, such as thermal management controlstate machine 458 of FIG. 4, sensed the DTS. The maximum temperaturestatus register stores the maximal temperature of its target DTS sincethe last time the computer system reads the within the maximumtemperature status register or the computer system resets. The maximumtemperature status register may be read using any number of devices,such as a processor, an integrated circuit, or through a device usingthe Serial Peripheral Interface (SPI) port or Joint Test Action Group(JTAG) port. Although, reading the register through the JTAG port doesnot cause a reset.

Illustratively limiting the following discussion to one DTS, the maximaltemperature after the computer system starts or resets (step 602) iszero. Once the thermal management control state machine senses thetemperature of the DTS, the thermal management control state machinesends the sensed temperature of the DTS to a comparator, such ascomparator 454 of FIG. 4 (step 604). The comparator compares the sensedtemperature to the current maximal temperature stored in the maximumtemperature status register for that DTS (step 606). If at step 606 thesensed temperature is higher than the current maximal temperature storedin the maximum temperature status register, then the sensed temperaturebecomes the new maximal temperature and the thermal management controlstate machine logs the new maximal temperature in the maximumtemperature status register (step 608). That is, the thermal managementcontrol state machine overwrites or replaces the current maximaltemperature stored in the maximum temperature status register. If atstep 606 the sensed temperature is lower than or equal to the currentmaximal temperature stored in the maximum temperature status register,the maximum temperature status register holds the current maximaltemperature existing in the maximum temperature status register (step610).

The current maximal temperature in the maximum temperature statusregister stays at the maximal temperature until the computer systemreads the maximum temperature status register in the form of a readrequest (step 612) or the computer system resets. If the current maximaltemperature is not read, the operation returns to step 604. If at step612 the computer system reads the current maximal temperature, then thethermal management control state machine resets the current maximaltemperature to the current temperature in the current temperature statusregister (step 614), with the operation returning to step 604.

For an example of this operation, if a DTS of a particular unit, such asthe core of a processor or the processor itself, over a period of timewere to sense temperatures of: 67° C., 70° C., 75° C., 72° C., and 74°C., the maximal temperature in the maximum temperature status registerwould be 75° C. If after the fourth sensing of the DTS, the computersystem issues a read request, the maximal temperature returned would be75° C. However, at this point the thermal management control statemachine resets the maximal temperature to the current temperature andafter the last sense performed by the DTS, the maximal temperature inthe maximum temperature status register would be 74° C.

Thus, the intent of the maximum temperature status register is to logthe maximal temperature reached by the DTSs since the maximumtemperature register was last read. This maximal temperature informationassists the operating system in determining the maximal temperaturereached by the DTS during the execution of an application or programwithout continuously polling the current temperature register.Continuous polling would affect the performance of the system andtherefore could affect the maximal temperature. In addition, polling thecurrent temperature does not guarantee the maximal temperature is read.This would be the case if the maximal temperature occurred between readsof the current temperature.

FIG. 7 depicts a flow diagram of the operation for tracing thermal datavia performance monitoring in accordance with another illustrativeembodiment. As previously described, the Cell BE chip includes a thermalmanagement system that is provided through pervasive logic unit 351 ofFIG. 3. Performance monitoring may be provided through a performancemonitor, such as performance monitor 466 of FIG. 4. Performancemonitoring may trace thermal data provided by temperature sensingdevices, such as DTSs 404, 406, 408, and 410 of FIG. 4, in its internalmemory, such as memory 470 of FIG. 4, write to main memory, such as mainmemory 208 of FIG. 2 or off chip device 472 of FIG. 4, or to an I/Odevice, such as south bridge and input/output (I/O) controller hub (ICH)204 of FIG. 2 or off chip I/O device 474 of FIG. 4.

Performance monitoring supports two main tracing modes: tracing for afixed time period or continuous tracing. The trace of thermalperformance may be a trace, such as trace 500 of FIG. 5. Performancemonitoring may also provide for configuration of the sampling frequencyto control the time period between two consecutive samples. Furthermore,compression of the thermal information can be used to increase thesampling interval. One compression technique is to only store thethermal information when a change occurs. A count of the number ofthermal samples which were the same could also be stored along with thethermal information. This is a useful technique since thermalinformation is typically slow to change.

As the operation for tracing thermal data via a performance monitorbegins, the thermal management control state machine, such as thermalmanagement control state machine 458 of FIG. 4, sets the performancemonitor into a tracing mode (step 702). Illustratively, limiting thefollowing discussion to one DTS, the thermal management control statemachine senses the temperature of the DTS (step 704) and sends thesensed temperature of the DTS to a current temperature status registerand/or other data structure to be stored (step 706). At this point thethermal management control state machine determines whether theperformance monitor is still running (step 708). Once the performancemonitor starts in step 702, the performance monitor will either run fora user specified time period or run until stopped by the user through auser input. However, the performance monitor may also stop based on aspecific thermal condition. The specific thermal condition is called atrigger, such as a logic analyzer looking for a specific condition on aset of signals. The use of a trigger may be useful in software debug.For example, a user may setup the performance monitor to stop, orcheckstop, the system when a thermal condition is reached. This mayallow the user to determine exactly which piece of code or combinationof code is causing the thermal condition. If the performance monitor isstill running at step 708, the operation returns to step 704.

Returning to step 708, if the performance monitor is no longer running,the thermal management control state machine reads the temperatureinformation stored in the memory and graphically displays the storedinformation for the user (step 710), with the operation endingthereafter. It is also possible for the sensed temperature sent to acurrent temperature status register and/or other data structure at step706 to be simultaneously displayed while the operation is still inprocess (step 710) indicated by arrow 712, rather than waiting for thetracing to end.

Thus, the performance monitor traces thermal data provided by the DTSs.Automatically tracing thermal data eliminates the need for software tocontinuously poll the current temperature register. Performancemonitoring is important for collecting thermal data of a workloadbecause performance monitoring does not require insertion of additionalcode to poll the thermal data, which could change the behavior of theworkload. In other words, performance monitoring provides a non-invasivemethod to trace thermal profile of software applications in real-time.An additional benefit of sending the thermal information to theperformance monitor is the ability to trigger or stop recording thethermal information on a pre-specified thermal condition. In addition,the performance monitor may also be used to stop the system (orcheckstop) when a thermal condition is met. Doing so allows a user todetermine which code segment or combination of code segments is creatingthe thermal condition. The user may then rewrite the code segment oravoid the specific combination, thus avoiding the thermal event.

FIGS. 8A and 8B depict flow diagrams of the operation for advancedthermal interrupt generation in accordance with an additionalillustrative embodiment. As previously described, the Cell BE chipincludes a thermal management system that is provided through pervasivelogic unit 351 of FIG. 3. Advanced thermal interrupt generation isanother feature that helps an operating system to handle a thermalevent. Advanced thermal interrupt logic is part of a thermal managementcontrol unit, such as TMCU 402 of FIG. 4. Thermal interrupts alert theoperating system when there is a thermal condition (i.e. chiptemperature rises above certain threshold). In such an event, theoperating system should take corrective actions to reduce chiptemperature. The corrective actions may be handled by a softwareinterrupt handler, which is a piece of code which handles the thermalcondition and initiates the corrective actions. The operating systemthen waits for the thermal condition to go away before resuming normaloperation. This usually requires the operating system to wait a specificamount of time, then poll the temperature of the processor to determineif it is safe to resume normal operation. With the advanced thermalinterrupt generation, the operating system may set the interrupt todetect when the temperature falls below a certain threshold, thuseliminating the need to poll the current temperature registers. Thecombination thermal sensor interrupt mask register 424 (TS_IMR) andthermal sensor interrupt status register 422 (TS_ISR) of FIG. 4 makehandling a thermal event much easier for the operating system.

Advanced thermal interrupt generation may be performed at a local leveland a global level. That is, advanced thermal interrupt generation maybe performed either individually (local) on a specific DTS or on all(global) DTSs such as DTSs 404, 406, 408, and 410 of FIG. 4. Thedirection bits of thermal sensor interrupt mask register are B_(G) andB_(X). The interrupt direction defines a condition that generates aninterrupt. The interrupt can either be generated when the temperaturechanges from below the interrupt temperature to equal to or above theinterrupt temperature, or when the temperature changes from above orequal to the interrupt temperature to below the interrupt temperature.The thermal management control state machine identifies the condition bythe direction bits, B_(G) and B_(X), in the interrupt mask register.B_(G) is the global direction bit. When B_(G) is set to ‘0’, the thermalmanagement control state machine generates an interrupt when thetemperature of any DTS is greater or equal to the global interrupttemperature. When B_(G) is set to ‘1’, the thermal management controlstate machine generates an interrupt when the temperature of all DTSsare below the global interrupt temperature. B_(X) is the local directionbit, where X is the number of the individually associated DTSs. WhenB_(X) is set to ‘0’, the thermal management control state machinegenerates an interrupt when the temperature of the individual DTS isgreater or equal to the DTS interrupt temperature. When B_(X) is set to‘1’, the thermal management control state machine generates an interruptwhen the temperature of the individual DTS is below the DTS interrupttemperature. The thermal interrupt status register (TS_ISR) recordswhich sensor caused the advanced thermal interrupt. Software reads thisregister to determine which condition occurred and which sensor orsensors caused the interrupt. The thermal management control statemachine resets the status bits in the thermal interrupt status registeronce read by software.

Therefore, the operation for advanced thermal interrupt generation maybe shown from a global as well as a local view. FIG. 8A depicts theglobal advanced thermal interrupt generation and FIG. 8B depicts thelocal advanced thermal interrupt generation. As the operation begins inthe global advanced thermal interrupt generation, FIG. 8A, the thermalmanagement control state machine sets the global interrupt temperature Tto temperature T1 and sets the global interrupt direction B_(G) to ‘0’(step 802). The thermal management control state machine senses thetemperature of the DTSs (step 804). The thermal management control statemachine determines if any sensed temperature from the DTSs is greaterthan or equal to temperature T1 (step 806). If no sensed temperature isgreater than or equal to temperature T1, then the operation returns tostep 804. If at step 806 any one of the sensed temperatures is greaterthan or equal to temperature T1, then the thermal management controlstate machine generates an interrupt and sets the corresponding statusbits in the thermal interrupt status register to record which sensors orsensors caused the interrupt (step 808). The operating system will thenservice the interrupt and may either slow down the workload on theprocessor or offload some of the workload of the processor to anotherprocessor in the system.

After the interrupt is generated, the thermal management control statemachine sets the global interrupt temperature T to temperature T2 andthe global interrupt direction B_(G) is set to ‘1’ (step 810).Temperature T2 should be set to less than or equal to temperature T1.The thermal management control state machine again senses thetemperature of the DTSs (step 812). The thermal management control statemachine determines if all the sensed temperatures from the DTSs arebelow temperature T2 (step 814). If no sensed temperature is belowtemperature T2, then the operation returns to step 812. If at step 814all of the sensed temperatures are below temperature T2, then thethermal management control state machine generates an interrupt and setsthe corresponding status bits in the thermal interrupt status registerto record which sensors or sensors caused the interrupt (step 816). Atthis point, it is now safe for the operating system to resume normaloperation. The operating system will then service the interrupt andrestore the system to normal operation. Next, the operation returns tostep 802, where the global interrupt temperature T is set to temperatureT1 and the global interrupt direction B_(G) is set to ‘0’.

An example of this operation would be, if all the DTSs have a globalinterrupt temperature of 80° C. and a global interrupt direction of ‘0’.Once any DTS of the associated units, such as the core of a processor orthe processor itself, senses a temperature greater than or equal to 80°C., the thermal management control state machine generates an interruptand sets the corresponding status bits in the thermal interrupt statusregister to record which sensors or sensors caused the interrupt. Theoperating system will then service the interrupt and may either slowdown the workload on the processor or offload some of the workload ofthe processor to another processor in the system. Also, at this pointthe thermal management control state machine may reset the globalinterrupt temperature to an exemplary 77° C. and set the globalinterrupt direction to ‘1’. The workload will continue to operate in aslow mode or remain off the processor until the DTSs sense a temperaturethat is below 77° C. for all of the DTSs. Once the thermal managementcontrol state machine determines the sensed temperature to be below 77°C., the thermal management control state machine generates anotherinterrupt. The thermal management control state machine sets the globalinterrupt temperature to 80° C., sets the global interrupt direction to‘0’, and then the operating system resumes normal operation of theworkload.

Turning to FIG. 8B, the illustrative embodiment is limited to one DTSalthough the illustration is the same for each DTS. As the operationbegins for the local advanced thermal interrupt generation, the thermalmanagement control state machine sets the local interrupt temperature Tto temperature T3 and sets the local interrupt direction B_(X) to ‘0’(step 852). The thermal management control state machine senses thetemperature of the DTS (step 854). The thermal management control statemachine determines if the sensed temperature from the DTS is greaterthan or equal to temperature T3 (step 856). If the sensed temperature isnot greater than or equal to temperature T3, then the operation returnsto step 854. If the sensed temperature is greater than or equal totemperature T3, then the thermal management control state machinegenerates an interrupt and sets the corresponding status bits in thethermal interrupt status register to record which sensors or sensorscaused the interrupt (step 858). The operating system will then servicethe interrupt and may either slow down the workload on the processor oroffload some of the workload to other units within the processor or toanother processor in the system.

After the thermal management control state machine generates theinterrupt, the thermal management control state machine sets the localinterrupt temperature T to temperature T4 and sets the local interruptdirection B_(X) to ‘1’ (step 860). Temperature T4 should be set to lessthan or equal to temperature T3. The thermal management control statemachine again senses the temperature of the DTS (step 862). The thermalmanagement control state machine determines if the sensed temperaturefrom the DTS is below temperature T4 (step 864). If the sensedtemperature is not below temperature T4, then the operation returns tostep 862. If the sensed temperature is below temperature T4, then thethermal management control state machine generates an interrupt and setsthe corresponding status bits in the thermal interrupt status registerto record which sensors or sensors caused the interrupt (step 866). Atthis point, it is now safe for the operating system to resume normaloperation. The operating system will then service the interrupt andrestore the system to normal operation. Next, the operation returns tostep 852 where the thermal management control state machine sets thelocal interrupt temperature T to temperature T3 and sets the localinterrupt direction B_(X) to ‘0’.

An example of this operation would be, if a given DTS has a localinterrupt temperature of 80° C. and a local interrupt direction of ‘0’.Once the DTS of an associated unit senses a temperature greater than orequal to 80° C., the thermal management control state machine generatesan interrupt, and sets the corresponding status bits in the thermalinterrupt status register to record which sensors or sensors caused theinterrupt. The operating system will then service the interrupt and mayeither slow down the workload on the processor or offload some of theworkload of the processor to another processor in the system. Also, atthis point the thermal management control state machine may reset thelocal interrupt temperature to an exemplary 77° C. and set the localinterrupt direction to ‘1’. The workload will continue to operate in aslow mode or remain off the unit of processor experiencing the thermalcondition or the processor until the DTS senses a temperature that isbelow 77° C. Once the thermal management control state machinedetermines the sensed temperature to be below 77° C., the thermalmanagement control state machine generates another interrupt. Thethermal management control state machine sets the local interrupttemperature to 80° C., sets the local interrupt direction to ‘0’, andthen the operating system resumes normal operation of the workload.

Thus, advanced thermal interrupt generation allows the operating systemto program interrupt generation to follow the direction of temperaturechange and eliminates the need for an interrupt handler to continuallypoll the current temperature in the case of a thermal interrupt.

FIG. 9 depicts a flow diagram of the operation for support of deep powersavings mode and partial good in a thermal management system inaccordance with an additional illustrative embodiment. As previouslydescribed, the Cell BE chip includes a thermal management system that isprovided through pervasive logic unit 351 of FIG. 3. In the Cell BE chip300 of FIG. 3, there exists a number of power saving modes. Depending onthe implementation of each of the power saving modes, some may limit theaccessibility of the DTSs, such as DTSs 404, 406, 408, and 410 of FIG.4. For example, if a SPU, such as SPUs (SPU) 310, 311, and 312 of FIG.3, is in a power saving mode where the clock is turned off, that is thedeserializer, such as deserializer 462 of FIG. 4, is disabled, the pathbetween the serializer, such as serializer 456 of FIG. 4, and the DTS,such as DTS 404 of FIG. 4, will not function. Another example of a powersaving mode could be where the power supply is turned off. In this case,the actual DTS could be disabled. Another example is where the thermalmanagement control state machine determines the sensor or a unit withinthe processor to be broken during manufacturing test. If the sensor orunit is redundant, manufacturing can mark the sensor or unit as faulty,creating a partial good processor that will still function with just alimited number of units or sensors. In either case, the thermalmanagement control state machine, such as thermal management controlstate machine 458 of FIG. 4, needs to monitor the status of these powermodes and mask off the non functional DTS(s) from participation in thethermal management tasks (e.g. throttling, interrupts, etc.).

Returning to FIG. 9, which depicts the flow diagram of the operation forsupport of deep power savings mode and partial good in a thermal sensingand thermal management system. As the operation begins, the thermalmanagement control state machine uses data from the various DTSs totrack the status of the DTSs (step 902). The thermal management controlstate machine stores the data in internal calibration storages, such asinternal calibration storage 428 of FIG. 4. As discussed previously,operation of a particular DTS may be inhibited by a power savings mode,a faulty DTS, or SPU which is communicated to the thermal managementcontrol state machine via data flow, such as data flow 460 of FIG. 4.The effect of partial good condition reported by the manufacturingprocess is similar to power savings mode, except a partial good is apermanent condition and the DTS should be permanently masked off. In thecase a SPU is marked faulty, the thermal management control statemachine turns off the entire SPU, and disables the serializer. In case aDTS is marked faulty, the thermal management control state machine masksoff the DTS. The thermal management control state machine determineswhether the DTS or SPU is faulty or functional (step 904). If the DTS orSPU is faulty, the thermal management control state machine masks offthe DTS (step 906), with the operating ending thereafter.

In order to mask off a DTS that is in a power management state, thethermal management control state machine resets the related currenttemperature status register of the current temperature status registers,such as current temperature status register 412 of FIG. 4 to 0x0, whichis the lowest temperature setting. An alternative method might also beto allocate an encoding of the related current temperature statusregister, by setting a status bit, to indicate the DTS is masked, whichmay be more precise than to just reset the sensor reading. The thermalmanagement control state machine then stops communications from thecurrent temperature status register to and from the DTS. Stoppingcommunications is an optional step mainly to save power and not performuseless overhead work. The thermal management control state machine thengenerates a signal to indicate the DTS is currently masked and shouldnot participate in thermal management tasks. Finally, the thermalmanagement control state machine resets the state of the DTS. When theunit, such as the core of a processor or the processor itself, relatedto the DTS exits power savings mode, the thermal management controlstate machine resumes communication to DTS, resumes updating of thecurrent temperature status register, and sends a signal that the DTS mayparticipate in thermal management tasks.

Returning to step 904, if the DTS and SPU are both functional, thethermal management control state machine starts communication to DTS(step 908). The thermal management control state machine monitors thepower management states of the SPU to determine when the SPU enters apower savings mode (step 910). Until the SPU enters a power savingsmode, the operation returns to step 908. If the SPU enters the powersavings mode and the DTS is disabled, the thermal management controlstate machine masks off the DTS in a method as discussed above withrelation to step 906 (step 912). Since the DTS is indicated as disabledand functional, the thermal management control state machine continuesmonitoring of the power management state of the SPU (step 914). Untilthe SPU exits the power savings mode, the operation returns to step 912.When the SPU exits power savings mode, and the DTS is no longerdisabled, the thermal control state machine starts communication to DTS,resumes updating of the current temperature status register, and sends asignal that the DTS may participate in thermal management tasks (step916), with the operation returning to step 908.

Thus, masking the temperature readings of DTSs that are partially good,faulty, or in a power savings mode isolates the none-working or disabledDTS from participating in the thermal management tasks.

FIG. 10 depicts a flow diagram of the operation for a thermal throttlecontrol feature which enables real-time testing of thermal awaresoftware applications independent of temperature in accordance with anadditional illustrative embodiment. As previously described, the Cell BEchip includes a thermal management system that is provided throughpervasive logic unit 351 of FIG. 3. Thermal management controlregisters, such as thermal management control registers 430 of FIG. 4,provide access and configuration for various thermal throttle controlfeatures. Thermal throttle is designed to reduce temperature by cuttingback performance in case of a thermal event using throttling.

Thermal management stop time registers, such as thermal management stoptime registers 434 of FIG. 4, and thermal management throttle scaleregister, such as thermal management throttle scale register 436 of FIG.4, together set the amount of throttling and the behavior of throttling.In a real-time system, real-time deadlines need to be guaranteed. It isimportant for a software developer and the quality assurance team toknow and test the maximal amount of throttling, which is the maximalsetting of the thermal management stop time registers and the thermalmanagement throttle scale register a program or a code segment maytolerate and still guarantee real-time deadlines of the real-timesystem. Instead of adjusting the actual temperature of the hardware tocause a thermal event and, thus, trigger a throttling condition, thethermal management control state machine provides a mode that alwaysprovides throttling, regardless of the temperature. The thermalmanagement control state machine sets this mode in a thermal managementcontrol register, which sets the chips into a constant throttle state.This feature aids the software developer to test and qualify their codeto meet real-time standards.

As the operation begins, thermal management stop time registers andthermal management throttle scale register thermal control settings arereceived (step 1002). The thermal management control state machine usesthe settings of the thermal management stop time registers and thermalmanagement throttle scale register to determine how throttling will beperformed. Then, the thermal management control state machine sets thetest mode and sets the thermal management control registers to an alwaysthrottle setting (step 1004). Then the program runs for a real-timevalidation that the software or program will meet the real-time deadlineunder the thermal management stop time registers and thermal managementthrottle scale register thermal control settings (step 1006). The testmode may be any type of throttling mode, such as always throttle orrandomly throttle. Then, the thermal management control state machinedetermines if the real-time deadline was met (step 1008). If thereal-time deadline was not met, the thermal management control statemachine records the current thermal management stop time registers andthermal management throttle scale register thermal control settings asfailing (step 1010). The thermal management control state machine thendetermines whether there are any new thermal management stop timeregisters and thermal management throttle scale register thermal controlsettings that will decrease the amount of throttling (step 1012). Ifthere are new thermal management stop time registers and thermalmanagement throttle scale register thermal control settings, theoperation returns to step 1002. If at step 1012 there are not any newthermal management stop time registers and thermal management throttlescale register thermal control settings, the operation ends.

Returning to step 1008, if the real-time deadline was met, the thermalmanagement control state machine records the current thermal managementstop time registers and thermal management throttle scale registerthermal control settings as passing (step 1014). The thermal managementcontrol state machine determines whether there are any new thermalmanagement stop time registers and thermal management throttle scaleregister thermal control settings that will increase the amount ofthrottling (step 1016). If there are new thermal management stop timeregisters and thermal management throttle scale register thermal controlsettings, the operation returns to step 1002. If at step 1016, there arenot any new thermal management stop time registers and thermalmanagement throttle scale register thermal control settings, theoperation ends.

Thus, providing a mode of operation that always throttles aids softwaredevelopers to test and qualify that their code meet real-time deadlinesunder the worst case thermal conditions. The software developer and thequality assurance team can also use this feature to determine themaximal amount of throttling a program or a code segment may tolerateand still be guaranteed to meet the real-time deadlines of the real-timesystem. Once the thermal management control state machine determines andvalidates the maximal amount of throttling, software can set aninterrupt to occur on the condition where full throttling occurs. If thethermal management control state machine ever generates this interrupt,the thermal management control state machine notifies the applicationthat a potential exist for the real-time guarantee to be violated or notmet.

In addition to the always throttle control setting, it is also possiblefor an implementation to provide a mode which would inject randomthermal events or directed random thermal events to simulate morerealistic interactions of throttling and the execution of software. Thistechnique is similar to randomly injecting errors on a bus to test errorrecovery code.

FIG. 11 depicts a flow diagram of the operation for an implementation ofthermal throttle control with minimal impact to interrupt latency inaccordance with an additional illustrative embodiment. As previouslydescribed, the Cell BE chip includes a thermal management system that isprovided through pervasive logic unit 351 of FIG. 3. When any part of acomputer system is placed in a throttling condition, the throttlingcondition reduces performance of the entire system. The reduction ofperformance increases the latency of an interrupt, in terms of how soonan interrupt can be serviced as well as how long it will take to servicethe interrupt. The increase of interrupt latency has serious implicationto the system as a whole, and therefore a desirability and necessityexists to minimize the impact of thermal throttling to interruptlatency. Minimizing the impact of thermal throttling due to interruptlatency is a feature directed to a PPU throttle control, such as by PPU308 of FIG. 3. SPUs, such as SPUs 310, 311, and 312 of FIG. 3, do nottake interrupts and therefore are not affected by this feature.

As the operation begins, the thermal management controls state machine,such as thermal management control state machine 458 of FIG. 4, monitorsall PPU interrupt status bits and the thermal management systeminterrupt mask register, such as thermal management system interruptmask register 438 of FIG. 4 (step 1102). The thermal management systeminterrupt mask register controls masking of an interrupt. The thermalmanagement control state machine determines if there are any interruptspending which are unmasked (step 1104). If there are no interruptspending or there are interrupts pending but are masked, the operationreturns to step 1102.

If at step 1104 there are interrupts pending that are unmasked, thethermal management control state machine temporarily disables anythrottle mode regardless of a partial throttle or full throttle state(step 1106). Disabling the throttle mode allows the PPU to temporarilyoperate at full performance and handle any pending interrupts withoutany delay induced by the effects of thermal throttling. Again, thethermal management control state machine monitors all PPU interruptstatuses and the thermal management system interrupt mask register (step1108). The thermal management control state machine determines if thereare any interrupts pending which are not masked (step 1110). If thereare no interrupts pending or there are interrupts pending but aremasked, the operation returns to step 1108. When at step 1110 theinterrupt status clears, the thermal management control state machinerestores the PPU to the original throttle mode (step 1112) and theoperation returns to step 1102.

The interrupt handler has the choice to clear the interrupt status bitat the beginning of the interrupt handler routine, or at the end of theroutine. The interrupt handler may be located in the power processorelement, such as power processor element 301 of FIG. 3, or softwareexecuted by the power processor element. If the interrupt handlerchooses to clear the interrupt status bit at the beginning and also liketo avoid any performance degradation of PPU, the interrupt handler maydisable the thermal throttling before clearing the interrupt status bit.That is, the interrupt does not cause a change in the control register.Therefore, throttling is still enabled, but suspended by the thermalmanagement control unit, such as TMCU 402 of FIG. 4, when an unmaskedinterrupt is present. If the interrupt handler should reset theinterrupt status prior to handling the interrupt, the handler should setthe control register to disable throttling (or reduce the amount ofthrottling to an acceptable level), reset the interrupt, service theinterrupt, and then re-enable throttling or set the amount of throttlingback to the previous level. An exemplary disablement of thermalthrottling may be performed by setting the thermal management controlregisters, such as thermal management control registers 430 of FIG. 4,to 0XX, where X is does not care. At the end of the interrupt routine,interrupt handler should set thermal management control registers backto its original value. If interrupt handler clears the interrupt statusbit at the end of the interrupt routine, no additional work is requiredand the thermal management control state machine will keep the PPU outof throttle mode as long as interrupt status bit is active.

FIG. 12 depicts a flow diagram of the operation for hysteresis inthermal throttling in accordance with an additional illustrativeembodiment. As previously described, the Cell BE chip includes a thermalmanagement system that is provided through pervasive logic unit 351 ofFIG. 3. Hysteresis in thermal throttling is the lag between making achange, such as throttling and ending throttling, and the response oreffect of that change. For example, if the throttling point is set to75° C. and the end throttling point is set to 72° C., the hysteresisranges from 75° C. to 72° C. FIG. 5 depicts a thermal throttlinghysteresis.

A thermal management throttle point register, such as thermal managementthrottle point register 432 of FIG. 4, provides two temperaturesettings: throttle temperature and end throttle temperature. Thethrottle temperature should be set to higher than the end throttletemperature. The temperature difference defines the amount of hysteresisbetween the throttle temperature and end throttle temperature, thusproviding a programmable amount of hysteresis.

Illustratively limiting the following discussion to one DTS, as theoperation of hysteresis thermal throttling begins, the thermalmanagement control state machine sets the throttle temperature and endthrottle temperature in the thermal management throttle point register(step 1202). The thermal management control state machine senses thetemperature of the DTS (step 1204). The thermal management control statemachine determines whether the sensed temperature from the DTS isgreater than or equal to the throttling temperature (step 1206). If thesensed temperature is not greater than or equal to the throttlingtemperature, the operation returns to step 1204. If at step 1206 thesensed temperature is greater than or equal to the throttlingtemperature, the thermal management control state machine initiates thethrottling mode (step 1208).

Again, the thermal management control state machine senses thetemperature of the DTS (step 1210). The thermal management control statemachine determines whether the sensed temperature from the DTS isgreater than or equal to the throttling temperature (step 1212). If thesensed temperature is not less than the end throttling temperature, theoperation returns to step 1210. If at step 1212 the DTS is less than theend throttling temperature, the thermal management control state machinedisables the throttling mode (step 1214), with the operation returningto step 1204.

Thus, when temperature rises to equal or above the throttle temperature,the thermal management control state machine puts the unit into throttlemode, assuming the thermal management control registers are properlyconfigured to allow throttle mode. The thermal management control statemachine keeps the unit in throttle mode until temperature falls belowend throttle temperature. If the end throttle temperature is less thanthrottle temperature, the identified hysteresis allows the unit to cooloff sufficiently before disabling the throttle mode. Without thehysteresis, a unit could be in and out of the throttle mode veryfrequently and reduce the overall efficiency of throttling and theefficiency of the processor.

An exemplary method of throttling of a processor may be accomplished byblocking the dispatch of instructions. If throttling is enabled anddisabled very frequently, then the pipeline of the processor may beflushed very often, thus, reducing the processing capability. Anotherexemplary method of throttling of a processor may be accomplished byslowing down the clock frequency.

FIG. 13 depicts a flow diagram of the operation of an implementation ofthermal throttling logic in accordance with an additional illustrativeembodiment. FIG. 13 represents a complete thermal management solution asdescribed in the above Figures. As previously described, the Cell BEchip includes a thermal management system that is provided throughpervasive logic unit 351 of FIG. 3. The TMCU such as TMCU 402 of FIG. 4includes a number of dynamic thermal management registers. The dynamicthermal management registers are thermal management control registers,thermal management throttle point register, thermal management stop timeregisters, thermal management throttle scale register, and thermalmanagement system interrupt mask register, such thermal managementcontrol registers 430 (TM_CR1 and TM_CR2), thermal management throttlepoint register 432 (TM_TPR), thermal management stop time registers 434(TM_STR1 and TM_STR2), thermal management throttle scale register 436(TM_TSR), and thermal management system interrupt mask register 438(TM_SIMR) of FIG. 4.

Thermal management throttle point register sets the throttle point forthe DTSs. Two independent throttle points may be set in thermalmanagement throttle point register, one for the PPE and one for theSPEs. Also contained in this register are temperature points forenabling throttling and disabling throttling or stopping the PPE orSPEs. Execution throttling of a PPE or a SPE starts when the temperatureis equal to or above the throttle point. Throttling ceases when thetemperature drops below the temperature to disable throttling. If thetemperature reaches the full throttle or stop temperature, the executionof the PPE or SPE is stopped.

The thermal management control state machine uses thermal managementstop time registers and thermal management throttle scale register tocontrol the frequency and amount of throttling. When the temperaturereaches the throttle point, the thermal management control state machinestops the corresponding PPE or SPE for the number of clocks specified bythe corresponding scale value in thermal management throttle scaleregister. Then the thermal management control state machine allows thePPE or SPE to run for the number of clocks specified by the run value inthermal management stop time registers times the corresponding scalevalue. This sequence continues until the temperature falls below thedisable throttling.

The thermal management control state machine uses thermal managementsystem interrupt mask register to select which interrupts disablethrottling of the PPE while the interrupt is pending.

Thermal management control registers set the throttling mode for eachPPE or SPE independently. Following are the five different modes thatmay be set for each PPE or SPE independently:

-   -   Dynamic throttling disabled (including the core stop safety).    -   Normal operation (dynamic throttling and the core stop safety        are enabled).    -   PPE or SPE is always throttled (core stop safety is enabled).    -   Core stop safety disabled (dynamic throttling enabled and the        core stop safety are disabled).    -   PPE or SPE is always throttled and core stop safety disabled.

As the operation for implementing thermal throttling logic, the thermalmanagement control state machine sets the throttle temperature and endthrottle temperature in the thermal management throttle point register(step 1302). The thermal management control state machine senses thetemperature of the DTS (step 1304). The thermal management control statemachine determines whether the sensed temperature from the DTS isgreater than or equal to the throttling temperature (step 1306). If thesensed temperature is not greater than or equal to the throttlingtemperature, the operation returns to step 1304. If the sensedtemperature is greater than or equal to the throttling temperature, thethermal management control state machine initiates the throttling mode(step 1308).

Then, the thermal management control state machine controls thethrottling by the type of throttling as indicated by the valuesindicated in the thermal management control registers (step 1310). Oncethe type of throttling is indicated, the thermal management controlstate machine then limits the throttling by the amount of throttlingindicated in the thermal management stop time registers (step 1312). Thestop time registers sets a ratio between how long the processor will bestopped and how long the processor will be allowed to run or thepercentage of throttling. Finally, the thermal management control statemachine scales the duration of the stop and run times by the valuespecified in the thermal management scale register (step 1314). At thispoint the operation splits for concurrent operations, steps 1316 and1322. At step 1316, the thermal management control state machine sensesthe temperature of the DTS. The thermal management control state machinedetermines whether the sensed temperature from the DTS is greater thanor equal to the throttling temperature (step 1318). If the sensedtemperature is not less than the end throttling temperature, theoperation returns to step 1316. If the DTS is less than the endthrottling temperature, the thermal management control state machinedisables the throttling mode (step 1320), with the operation returningto step 1304.

Returning to step 1314, after the final throttling limitation isimplemented, the thermal management control state machine concurrentlymonitors all PPU interrupt status for any interrupts that are pending(step 1322). If an interrupt is encountered while throttling isimplemented, the thermal management control state machine temporarilydisables any throttle mode until the interrupt has been handled,whereupon, the throttling is enabled regardless of a partial throttle orfull throttle state and the operation returns to step 1308. An in-depthdiscussion of monitoring for an interrupt status is discussed withregard to FIG. 11.

Thus, the thermal interrupt logic of the thermal management systemincluded with the Cell BE chip provides a dynamic means for managing thethermal conditions of the Cell BE chip and protecting the Cell BE chipand its components.

The illustrative embodiments can take the form of an entirely hardwareembodiment, an entirely software embodiment or an embodiment containingboth hardware and software elements. The illustrative embodiments areimplemented in software, which includes but is not limited to firmware,resident software, microcode, etc.

Furthermore, the illustrative embodiments can take the form of acomputer program product accessible from a computer-usable orcomputer-readable medium providing program code for use by or inconnection with a computer or any instruction execution system. For thepurposes of this description, a computer-usable or computer readablemedium can be any tangible apparatus that can contain, store,communicate, propagate, or transport the program for use by or inconnection with the instruction execution system, apparatus, or device.

The medium can be an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system (or apparatus or device) or apropagation medium. Examples of a computer-readable medium include asemiconductor or solid state memory, magnetic tape, a removable computerdiskette, a random access memory (RAM), a read-only memory (ROM), arigid magnetic disk and an optical disk. Current examples of opticaldisks include compact disk-read only memory (CD-ROM), compactdisk-read/write (CD-R/W) and DVD.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code isretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the dataprocessing system to become coupled to other data processing systems orremote printers or storage devices through intervening private or publicnetworks. Modems, cable modem and Ethernet cards are just a few of thecurrently available types of network adapters.

The description of the illustrative embodiments have been presented forpurposes of illustration and description, and is not intended to beexhaustive or limited to the illustrative embodiments in the formdisclosed. Many modifications and variations will be apparent to thoseof ordinary skill in the art. The embodiment was chosen and described inorder to best explain the principles of the illustrative embodiments,the practical application, and to enable others of ordinary skill in theart to understand the illustrative embodiments for various embodimentswith various modifications as are suited to the particular usecontemplated.

1. A computer implemented method for thermal throttling control fortesting of real-time software in an integrated circuit, comprising:receiving at least one thermal control setting; setting a thermalmanagement system to a test mode using the at least one thermal controlsettings, wherein the test mode indicates a thermal throttling controlusing the thermal control setting; executing the real-time softwareunder the test mode; testing if a real-time deadline associated with thereal-time software is met under the test mode; and responsive to thereal-time software meeting the real-time deadline, recording the atleast one thermal control setting as a passing thermal control setting.2. The method of claim 1, wherein the receiving, setting, executing,testing, and recording steps are performed by a thermal managementcontrol state machine residing within the integrated circuit.
 3. Themethod of claim 1, further comprising: determining if at least one morethermal control setting that has an increased throttling under which thereal-time software may be tested exists; and responsive to the existenceof the increased thermal control setting, executing and testing thereal-time software a second time using the increased throttling setting.4. The method of claim 1, further comprising: responsive to the softwareprogram failing to meet the real-time deadline, recording the at leastone thermal control setting as a failing thermal control setting.
 5. Themethod of claim 4, further comprising: determining if at least one morethermal control setting that has a decreased throttling setting underwhich the real-time software may be tested exists; and responsive to theexistence of the decreased thermal control setting, executing andtesting the real-time software a second time using the decreasedthrottling setting.
 6. The method of claim 1, wherein the test modespecifies an always throttle state of the thermal management system. 7.The method of claim 1, wherein the test mode specifies a random throttlestate of the thermal management system.
 8. The method of claim 7,wherein the random throttle state injects random thermal events tosimulate more realistic interactions of throttling and the execution ofsoftware.
 9. The method of claim 1, wherein the thermal control settingsinclude an amount of throttling to be initiated and a duration for thetest mode to be initiated.
 10. The method of claim 9, wherein the amountof throttling initiated is a percentage of time that a unit is stoppedversus time that the unit is run.
 11. The method of claim 10, whereinthe time that a unit is stopped and the time that the unit is run isscaled by a scale register value.
 12. The method of claim 9, wherein theduration for the throttling mode to be initiated is an actual number ofclock cycles that a unit stops and runs.
 13. The method of claim 1,wherein the passing thermal control setting is stored in a datastructure.
 14. The method of claim 4, wherein the failing thermalcontrol setting is stored in a data structure.
 15. The method of claim1, wherein the test mode is set in a thermal management controlregister.
 16. The method of claim 1, wherein the integrated circuit is aheterogeneous multi-core processor.
 17. A data processing systemcomprising: a bus; a memory coupled to the bus, wherein the memoryincludes a set of instructions; and a integrated circuit coupled to thebus, wherein the integrated circuit executes the set of instructions toreceive at least one thermal control setting; set a thermal managementsystem to a test mode using the at least one thermal control settings,wherein the test mode indicates a thermal throttling control using thethermal control setting; execute the real-time software under the testmode; test if a real-time deadline associated with the real-timesoftware is met under the test mode; and record the at least one thermalcontrol setting as a passing thermal control setting in response to thereal-time software meeting the real-time deadline.
 18. The system ofclaim 17, wherein the integrated circuit executes the set ofinstructions to determine if at least one more thermal control settingthat has an increased throttling under which the real-time software maybe tested exists; and execute and test the real-time software a secondtime using the increased throttling setting in response to the existenceof the increased thermal control setting.
 19. The system of claim 11,wherein the integrated circuit executes the set of instructions torecord the at least one thermal control setting as a failing thermalcontrol setting in responsive to the software program failing to meetthe real-time deadline.
 20. The system of claim 19, wherein theintegrated circuit executes the set of instructions to determine if atleast one more thermal control setting that has a decreased throttlingsetting under which the real-time software may be tested exists; andexecute and test the real-time software a second time using thedecreased throttling setting in response to the existence of thedecreased thermal control setting.
 21. The system of claim 17, whereinthe test mode specifies at least one of an always throttle state of thethermal management system or a random throttle state of the thermalmanagement system.
 22. The system of claim 21, wherein the randomthrottle state injects random thermal events to simulate more realisticinteractions of throttling and the execution of software.
 23. The systemof claim 17, wherein the thermal control settings include an amount ofthrottling to be initiated and a duration for the test mode to beinitiated.
 24. The system of claim 23, wherein the amount of throttlinginitiated is a percentage of time that a unit is stopped versus timethat the unit is run.
 25. The system of claim 24, wherein the time thata unit is stopped and the time that the unit is run is scaled by a scaleregister value.
 26. The system of claim 23, wherein the duration for thethrottling mode to be initiated is an actual number of clock cycles thata unit stops and runs.
 27. A processor, comprising: at least oneprocessing core; a thermal management control state machine; a thermalmanagement system; and a digital thermal sensor, wherein the processorexecutes the set of instructions to receive at least one thermal controlsetting; set, using the state machine, the thermal management system toa test mode using the at least one thermal control settings, wherein thetest mode indicates a thermal throttling control using the thermalcontrol setting; execute, using the state machine, the real-timesoftware under the test mode; test, using the state machine, if areal-time deadline associated with the real-time software is met underthe test mode; and record, using the state machine, the at least onethermal control setting as a passing thermal control setting in responseto the real-time software meeting the real-time deadline.
 28. Theprocessor of claim 27, wherein the processor executes the set ofinstructions to determine, using the state machine, if at least one morethermal control setting that has an increased throttling under which thereal-time software may be tested exists; and execute and test, using thestate machine, the real-time software a second time using the increasedthrottling setting in response to the existence of the increased thermalcontrol setting.
 29. The processor of claim 27, wherein the processorexecutes the set of instructions to record, using the state machine, theat least one thermal control setting as a failing thermal controlsetting in response to the software program failing to meet thereal-time deadline.
 30. The processor of claim 29, wherein the processorexecutes the set of instructions to determine, using the state machine,if at least one more thermal control setting that has a decreasedthrottling setting under which the real-time software may be testedexists; and execute and test, using the state machine, the real-timesoftware a second time using the decreased throttling setting inresponse to the existence of the decreased thermal control setting. 31.The processor of claim 27, wherein the test mode specifies at least oneof an always throttle state of the thermal management system or a randomthrottle state of the thermal management system and wherein the randomthrottle state injects random thermal events to simulate more realisticinteractions of throttling and the execution of software.
 32. Theprocessor of claim 27, wherein the thermal control settings include anamount of throttling to be initiated and a duration for the test mode tobe initiated.
 33. The processor of claim 32, wherein the amount ofthrottling initiated is a percentage of time that a unit is stoppedversus time that the unit is run.
 34. The processor of claim 33, whereinthe time that a unit is stopped and the time that the unit is run isscaled by a scale register value.
 35. The processor of claim 32, whereinthe duration for the throttling mode to be initiated is an actual numberof clock cycles that a unit stops and runs.